
<h1><span class="yiyi-st" id="yiyi-11">Matrix library (<code class="xref py py-mod docutils literal"><span class="pre">numpy.matlib</span></code>)</span></h1>
        <blockquote>
        <p>原文：<a href="https://docs.scipy.org/doc/numpy/reference/routines.matlib.html">https://docs.scipy.org/doc/numpy/reference/routines.matlib.html</a></p>
        <p>译者：<a href="https://github.com/wizardforcel">飞龙</a> <a href="http://usyiyi.cn/">UsyiyiCN</a></p>
        <p>校对：（虚位以待）</p>
        </blockquote>
    
<p><span class="yiyi-st" id="yiyi-12">此模块包含<a class="reference internal" href="index.html#module-numpy" title="numpy"><code class="xref py py-mod docutils literal"><span class="pre">numpy</span></code></a>命名空间中的所有函数，具有以下替换函数，返回<a class="reference internal" href="generated/numpy.matrix.html#numpy.matrix" title="numpy.matrix"><code class="xref py py-class docutils literal"><span class="pre">matrices</span></code></a>而不是<a class="reference internal" href="generated/numpy.ndarray.html#numpy.ndarray" title="numpy.ndarray"><code class="xref py py-class docutils literal"><span class="pre">ndarrays</span></code></a>。</span></p>
<p><span class="yiyi-st" id="yiyi-13">同样在numpy命名空间和返回矩阵中的函数</span></p>
<table border="1" class="longtable docutils">
<colgroup>
<col width="10%">
<col width="90%">
</colgroup>
<tbody valign="top">
<tr class="row-odd"><td><span class="yiyi-st" id="yiyi-14"><a class="reference internal" href="generated/numpy.mat.html#numpy.mat" title="numpy.mat"><code class="xref py py-obj docutils literal"><span class="pre">mat</span></code></a>（data [，dtype]）</span></td>
<td><span class="yiyi-st" id="yiyi-15">将输入解释为矩阵。</span></td>
</tr>
<tr class="row-even"><td><span class="yiyi-st" id="yiyi-16"><a class="reference internal" href="generated/numpy.matrix.html#numpy.matrix" title="numpy.matrix"><code class="xref py py-obj docutils literal"><span class="pre">matrix</span></code></a></span></td>
<td><span class="yiyi-st" id="yiyi-17">从数组类对象或数据字符串返回一个矩阵。</span></td>
</tr>
<tr class="row-odd"><td><span class="yiyi-st" id="yiyi-18"><a class="reference internal" href="generated/numpy.asmatrix.html#numpy.asmatrix" title="numpy.asmatrix"><code class="xref py py-obj docutils literal"><span class="pre">asmatrix</span></code></a>（data [，dtype]）</span></td>
<td><span class="yiyi-st" id="yiyi-19">将输入解释为矩阵。</span></td>
</tr>
<tr class="row-even"><td><span class="yiyi-st" id="yiyi-20"><a class="reference internal" href="generated/numpy.bmat.html#numpy.bmat" title="numpy.bmat"><code class="xref py py-obj docutils literal"><span class="pre">bmat</span></code></a>（obj [，ldict，gdict]）</span></td>
<td><span class="yiyi-st" id="yiyi-21">从字符串，嵌套序列或数组构建一个矩阵对象。</span></td>
</tr>
</tbody>
</table>
<p><span class="yiyi-st" id="yiyi-22"><code class="xref py py-obj docutils literal"><span class="pre">matlib</span></code>中的替换函数</span></p>
<table border="1" class="longtable docutils">
<colgroup>
<col width="10%">
<col width="90%">
</colgroup>
<tbody valign="top">
<tr class="row-odd"><td><span class="yiyi-st" id="yiyi-23"><a class="reference internal" href="generated/numpy.matlib.empty.html#numpy.matlib.empty" title="numpy.matlib.empty"><code class="xref py py-obj docutils literal"><span class="pre">empty</span></code></a>（shape [，dtype，order]）</span></td>
<td><span class="yiyi-st" id="yiyi-24">返回给定形状和类型的新矩阵，而不初始化条目。</span></td>
</tr>
<tr class="row-even"><td><span class="yiyi-st" id="yiyi-25"><a class="reference internal" href="generated/numpy.matlib.zeros.html#numpy.matlib.zeros" title="numpy.matlib.zeros"><code class="xref py py-obj docutils literal"><span class="pre">zeros</span></code></a>（shape [，dtype，order]）</span></td>
<td><span class="yiyi-st" id="yiyi-26">返回给定形状和类型的矩阵，用零填充。</span></td>
</tr>
<tr class="row-odd"><td><span class="yiyi-st" id="yiyi-27"><a class="reference internal" href="generated/numpy.matlib.ones.html#numpy.matlib.ones" title="numpy.matlib.ones"><code class="xref py py-obj docutils literal"><span class="pre">ones</span></code></a>（shape [，dtype，order]）</span></td>
<td><span class="yiyi-st" id="yiyi-28">矩阵的一。</span></td>
</tr>
<tr class="row-even"><td><span class="yiyi-st" id="yiyi-29"><a class="reference internal" href="generated/numpy.matlib.eye.html#numpy.matlib.eye" title="numpy.matlib.eye"><code class="xref py py-obj docutils literal"><span class="pre">eye</span></code></a>（n [，M，k，dtype]）</span></td>
<td><span class="yiyi-st" id="yiyi-30">返回一个矩阵，在对角线上的1和其他地方的零。</span></td>
</tr>
<tr class="row-odd"><td><span class="yiyi-st" id="yiyi-31"><a class="reference internal" href="generated/numpy.matlib.identity.html#numpy.matlib.identity" title="numpy.matlib.identity"><code class="xref py py-obj docutils literal"><span class="pre">identity</span></code></a>（n [，dtype]）</span></td>
<td><span class="yiyi-st" id="yiyi-32">返回给定大小的方形单位矩阵。</span></td>
</tr>
<tr class="row-even"><td><span class="yiyi-st" id="yiyi-33"><a class="reference internal" href="generated/numpy.matlib.repmat.html#numpy.matlib.repmat" title="numpy.matlib.repmat"><code class="xref py py-obj docutils literal"><span class="pre">repmat</span></code></a>（a，m，n）</span></td>
<td><span class="yiyi-st" id="yiyi-34">重复0-D到2-D数组或矩阵MxN次。</span></td>
</tr>
<tr class="row-odd"><td><span class="yiyi-st" id="yiyi-35"><a class="reference internal" href="generated/numpy.matlib.rand.html#numpy.matlib.rand" title="numpy.matlib.rand"><code class="xref py py-obj docutils literal"><span class="pre">rand</span></code></a>（\ * args）</span></td>
<td><span class="yiyi-st" id="yiyi-36">返回具有给定形状的随机值矩阵。</span></td>
</tr>
<tr class="row-even"><td><span class="yiyi-st" id="yiyi-37"><a class="reference internal" href="generated/numpy.matlib.randn.html#numpy.matlib.randn" title="numpy.matlib.randn"><code class="xref py py-obj docutils literal"><span class="pre">randn</span></code></a>（\ * args）</span></td>
<td><span class="yiyi-st" id="yiyi-38">返回具有来自“标准正态”分布的数据的随机矩阵。</span></td>
</tr>
</tbody>
</table>
